#include<stdio.h>

int main()
{
    int n, x;
    scanf("%d %d", &n, &x);
    int arr[n + 1];
    for (int i = 1; i <= n; i++)
    {
        for (int j = i; j <= n; j += j)
        {
            if (arr[j] == 0)
                arr[j] = 1;
            else
                arr[j] = 0;
        }
    }

    if (arr[x] == 0)
        printf("OFF");
    else
        printf("ON");
    return 0;
}